package com.candy.sys.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.candy.sys.entity.Menu;
import com.candy.sys.mapper.MenuMapper;
import com.candy.sys.service.IMenuService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 菜单 服务实现类
 * </p>
 *
 * @author pxs
 * @since 2021-06-27
 */
@Service
public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements IMenuService {

	@Override
	public List<Menu> list(){
		QueryWrapper<Menu> queryWrapper = new QueryWrapper<>();
		queryWrapper.lambda().orderByAsc(Menu::getOrderNum);
		return getBaseMapper().selectList(queryWrapper);
	}
}
